using System;
using System.ComponentModel;
using System.Collections.Generic;
using Sinacor.Servico.Bovespa.ResumoFinanceiro.BusinessEntity;
using Sinacor.Servico.Bovespa.ResumoFinanceiro.Service.DataContract.Response;
using Sinacor.Servico.Bovespa.ResumoFinanceiro.Service.DataContract;

namespace Sinacor.Servico.Bovespa.ResumoFinanceiro.Service.ServiceImplementation.Translator
{
    /// <summary>
    /// Data : 12/05/2008
    /// Autor: Eduardo Sertorio
    /// Obs. : Criacao da classe (TranslateRetornoAlteracaoNota) - esertorio - 200805121907 - ref issue ID0004683
    /// </summary>
    public static class TranslateRetornoAlteracaoNota
	{
        /// <summary>
        /// Data : 12/05/2008
        /// Autor: Eduardo Sertorio
        /// Obs. : Criacao do metodo (ToRetornoAlteracaoNotaResponse) - esertorio - 200805121907 - ref issue ID0004683
        /// </summary>
        /// <param name="from"></param>
        /// <returns></returns>
        public static DataContract.Response.RetornoAlteracaoNotaResponse ToRetornoAlteracaoNotaResponse(BusinessEntity.RetornoAlteracaoNota from)
		{
            if (from == null)
                return null;

            DataContract.Response.RetornoAlteracaoNotaResponse to = new DataContract.Response.RetornoAlteracaoNotaResponse();

            to.AlterouNota = from.AlterouNota;
            to.MensagemRetornada.Codigo = from.MensagemRetornada.Codigo;
            to.MensagemRetornada.Descricao = from.MensagemRetornada.Descricao;

			return to;
		}
	}
}

